<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>用户详情tab页卡</title>
</head>

<body>
<ul class="nav nav-tabs" th:fragment="userDetailTab(userId,tabIndex)">
    <li th:class="${tabIndex==0?'active':''}">
        <a th:href="@{/user/detail(userId=${userId})}" href="user_detail.html">基本信息</a>
    </li>
    <li th:class="${tabIndex==1?'active':''}">
        <a th:href="@{/user/detail/advanceLog/1(userId=${userId})}" href="../user/user_detail_advance_log.html">余额明细</a>
    </li>
    <li th:class="${tabIndex==2?'active':''}">
        <a th:href="@{/user/detail/advanceLog/2(userId=${userId})}"
           href="../user/user_detail_advance_log.html">待入账余额明细</a>
    </li>
    <li th:class="${tabIndex==3?'active':''}">
        <a th:href="@{/user/detail/tree(userId=${userId})}" href="../user/user_detail_tree.html">人物关系</a>
    </li>
    <!--    <li th:class="${tabIndex==4?'active':''}">-->
    <!--        <a th:href="@{/user/detail/retailOrder(userId=${userId})}" href="../user/user_retail_order.html">他的订单</a>-->
    <!--    </li>-->
    <script type="text/javascript">
        var __tabManager = {
            init: function () {
                $.ajax("/user/detail/chkTabPower", {
                        method: "POST",
                        dataType: 'json',
                        success: function (res) {
                            if (res.resultCode === 2000) {
                                if (res.data.rebateLog === 1) {
                                    $('#tabRebateLog').show();
                                } else {
                                    $('#tabRebateLog').hide();
                                }

                                if (res.data.shareBonus === 1) {
                                    $('#tabShareBonus').show();
                                } else {
                                    $('#tabShareBonus').hide();
                                }
                            }
                        },
                        error: function () {

                        }
                    }
                );
            }
        };
        window.onload = function () {
            __tabManager.init();
        };
    </script>
</ul>


<div th:fragment="userDetailHeader" class="ibox-title" style="vertical-align: bottom;height: 100px;">
    <h5 style="font-size: 18px;">
        <img th:src="${user.avatar}" th:onerror="|this.src='@{/resource/img/d_head.jpeg}'|"
             onerror="this.src='../../resource/img/d_head.jpeg'"
             alt="" style="width:70px;height:70px;border-radius: 10px;">
        <span th:text="${user.mobile}">刘渠成</span>
    </h5>
    <button type="button" onclick="hot.newTab('/user/list','用户列表')"
            style="float: right;margin-top: -14px;margin-right: 10px;" class="btn btn-primary btn-xl m-b-none">返回
    </button>
</div>
</body>

</html>